package com.monlyu.vo;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Transient;

import com.monlyu.annotation.Comment;

/**
 * 
 * @author monlyu
 * @since 2009-12-15
 */
@Entity(name = "t_user")
@Comment(common = "用户信息表")
public class User extends BaseVo implements Serializable {

        private static final long serialVersionUID = 814981962061654128L;

        @Id
        @Column(name = "u_id")
        @Comment(common = "用户系统编号")
        private Long id;

        @Column(name = "u_nickName", unique = true, nullable = false)
        @Comment(common = "用户登录名,不能为空")
        private String nickName;

        @Column(name = "u_name", length = LENGTH_50, nullable = false)
        @Comment(common = "用户姓名")
        private String name;

        @Column(name = "u_passwd", length = SECRET_LENGTH, nullable = false)
        @Comment(common = "用户密码")
        private String passwd;

        @Column(name = "u_man")
        @Comment(common = "用户性别")
        private Boolean man;

        @Column(name = "u_telec", length = LENGTH_30)
        @Comment(common = "用户电话号码")
        private String telel;

        @Column(name = "u_link", length = LENGTH_50)
        @Comment(common = "用户联系方式")
        private String link;

        @Column(name = "u_address", length = MAX_VCHAR_MYSQL)
        @Comment(common = "家庭住址")
        private String address;

        @Column(name = "u_email", length = LENGTH_50)
        @Comment(common = "用户邮件地址")
        private String email;

        @Column(name = "u_dept")
        @Comment(common = "用户所在的部门")
        private Long dept;

        @Column(name = "u_degree")
        @Comment(common = "学历")
        private Long degree;

        @Column(name = "u_zzmm")
        @Comment(common = "政治面貌")
        private Long zzmm;

        @Column(name = "u_idcard", length = LENGTH_30)
        @Comment(common = "身份证号码")
        private String idcard;

        @Column(name = "u_folder", length = MAX_VCHAR_MYSQL)
        @Comment(common = "视频文件地址")
        private String folder;

        @Column(name = "u_folderbak", length = MAX_VCHAR_MYSQL)
        @Comment(common = "备用视频文件地址")
        private String folderbak;

        @Column(name = "u_enable")
        @Comment(common = "用户状态")
        private boolean enable;

        @Transient
        private Role role;

        public boolean isEnable() {
                return enable;
        }

        public void setEnable(boolean enable) {
                this.enable = enable;
        }

        public Long getDegree() {
                return degree;
        }

        public String getFolderbak() {
                return folderbak;
        }

        public void setFolderbak(String folderbak) {
                this.folderbak = folderbak;
        }

        public String getFolder() {
                return folder;
        }

        public void setFolder(String folder) {
                this.folder = folder;
        }

        public void setDegree(Long degree) {
                this.degree = degree;
        }

        public Long getZzmm() {
                return zzmm;
        }

        public void setZzmm(Long zzmm) {
                this.zzmm = zzmm;
        }

        public String getIdcard() {
                return idcard;
        }

        public void setIdcard(String idcard) {
                this.idcard = idcard;
        }

        public Long getId() {
                return id;
        }

        public Long getDept() {
                return dept;
        }

        public void setDept(Long dept) {
                this.dept = dept;
        }

        public Boolean getMan() {
                return man;
        }

        public void setMan(Boolean man) {
                this.man = man;
        }

        public void setId(Long id) {
                this.id = id;
        }

        public String getName() {
                return name;
        }

        public void setName(String name) {
                this.name = name;
        }

        public Role getRole() {
                return role;
        }

        public void setRole(Role role) {
                this.role = role;
        }

        public String getPasswd() {
                return passwd;
        }

        public void setPasswd(String passwd) {
                this.passwd = passwd;
        }

        public String getNickName() {
                return nickName;
        }

        public void setNickName(String nickName) {
                this.nickName = nickName;
        }

        public String getTelel() {
                return telel;
        }

        public void setTelel(String telel) {
                this.telel = telel;
        }

        public String getEmail() {
                return email;
        }

        public void setEmail(String email) {
                this.email = email;
        }

        public String getLink() {
                return link;
        }

        public void setLink(String link) {
                this.link = link;
        }

        public String getAddress() {
                return address;
        }

        public void setAddress(String address) {
                this.address = address;
        }
}